import request from '@/utils/request'

// 获取指数当日列表
export const getIndices = ({ page, size }) => {
  return request.get('/api/indices/latest', {
    params: { page, size }
  });
};

// 获取板块当日列表
export const getSectors = () => {
  return request.get('/api/sectors/daily-performance');
};

// 获取港股通当日列表
export const getHsgtFundFlow = () => {
  return request.get('/api/hk-connect/daily-trends');
};

// 获取证券快讯列表
export const getNews = () => {
  return request.get('/api/news/flashes');
};

// 获取新股上市日历列表
export const getNewIpos = ({ page, size }) => {
  return request.get('/api/ipos/calendar', {
    params: { page, size }
  });
};
